Release 10.1A: OpenEdge Development:
Progress Dynamics Basic Development
Building and using SmartBusinessObjects
The Progress SmartBusinessObject (SBO) is a container object for multiple SDOs. It can express complex business logic and data definitions that cannot be expressed in a single SDO, since an SDO is limited to a single database query (either a single database table or a straightforward join of tables). Its fundamental purpose is to allow a single update transaction on the server to span multiple SDOs.
The SBO is a nonvisual container for SDOs. Each SDO has its own
RowObjectdefinition and matching database query exactly as it would when used on its own. In addition, each SDO can still have its own update logic and separate logic procedure, as described in Chapter 10, " Building Basic Business Logic in a Progress Dynamics Application." The value of the SBO is that it allows more complex data to be managed and more complex logic to be expressed. Data from multiple SDOs can be coordinated, which could never be expressed in a single join. (A single join might place it only in an awkward nested one-to-many join that would be unusable for data management.) Business rules can be written for an SBO on top of the business logic in each SDO. The SBO logic can also look at updated rows in each of the contained SDOs.Because they are also nonvisual SmartObjects, you can add SBOs to a static or dynamic window just as you can add SDOs. You can then link user interface objects to the SBO as you would with an SDO. That is, the SBO can be a
Data-Sourceand anUpdate-Targetfor viewers and browsers, and aCommit-Targetand aNavigation-Targetfor a SmartToolbar or Progress SmartPanels™. The SBO brokers these data connections between outside objects and the SDOs inside itself. In some cases, this is accomplished automatically, based on the signatures of the objects (by matching fields displayed in a visual object with fields supplied by each SDO). In other cases, the other client objects have new properties to allow them to specify the contained SDO with which they should be associated. This section describes how to add SBOs to Progress Dynamics windows and how to set these additional properties.In general, the SBO is intended to be used as a kind of super SDO, reproducing most of the behavior, API, and properties of the SDO but providing the additional ability to deal with complex datasets.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |